<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Lua类</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="lua.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="lua.assign.html">Lua::assign</a></div>
 <div class="up"><a href="book.lua.html">Lua</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.lua" class="reference">

 <h1 class="title">Lua类</h1>
 

 <div class="partintro"><p class="verinfo">(PECL lua &gt;=0.9.0)</p>


  <div class="section" id="lua.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="lua.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">Lua</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">string</span>
      <var class="fieldsynopsis_varname"><a href="class.lua.html#lua.constants.lua-version"><var class="varname">LUA_VERSION</var></a></var>
     <span class="initializer"> = Lua 5.1.4</span>
    ;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.assign.html" class="methodname">assign</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.call.html" class="methodname">call</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$lua_func</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$args</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$use_self</code><span class="initializer"> = 0</span></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.call.html" class="methodname">__call</a></span>
    ( <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$lua_func</code></span>
   [, <span class="methodparam"><span class="type">array</span> <code class="parameter">$args</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$use_self</code><span class="initializer"> = 0</span></span>
  ]] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="lua.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$lua_script_file</code><span class="initializer"> = NULL</span></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.eval.html" class="methodname">eval</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$statements</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="lua.getversion.html" class="methodname">getVersion</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.include.html" class="methodname">include</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$file</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">mixed</span><span class="methodname"><a href="lua.registercallback.html" class="methodname">registerCallback</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   , <span class="methodparam"><span class="type"><a href="language.types.callable.html" class="type callable">callable</a></span> <code class="parameter">$function</code></span>
   )</div>

   }</div>


  </div>

  

  <div class="section" id="lua.constants">
   <h2 class="title">预定义常量</h2>
   <dl>


    
     <dt id="lua.constants.lua-version"><strong><code>Lua::LUA_VERSION</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

   </dl>

  </div>



 </div>

 
































































<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="lua.assign.html">Lua::assign</a> — 将一个php变量赋值给Lua</li><li><a href="lua.call.html">Lua::call</a> — 调用Lua函数</li><li><a href="lua.construct.html">Lua::__construct</a> — Lua 构造方法</li><li><a href="lua.eval.html">Lua::eval</a> — 将字符串当做Lua代码执行</li><li><a href="lua.getversion.html">Lua::getVersion</a> — 获取Lua版本</li><li><a href="lua.include.html">Lua::include</a> — 解析Lua脚本文件</li><li><a href="lua.registercallback.html">Lua::registerCallback</a> — 向Lua中注册php函数</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="lua.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="lua.assign.html">Lua::assign</a></div>
 <div class="up"><a href="book.lua.html">Lua</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
